package com.huangfu.learning.javabase.java.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Created with IntelliJ IDEA.
 * Author: huangfu.daohui
 * Date: 2018/7/21
 * Time: 16:06
 * Version: 1.0
 * Description:水果颜色
 **/
@Target(FIELD)
@Retention(RUNTIME)
@Documented
public @interface FruitColor {

    // 颜色枚举
    public enum Color {
        RED, GREEN, YELLOW, BLUE
    }

    Color fruitColor() default Color.GREEN;
}
